package com.github.catvod.parser;

import java.io.ByteArrayOutputStream;

/* renamed from: com.github.catvod.parser.۟ۤۥ۟ۢ, reason: contains not printable characters */
/* loaded from: classes.dex */
public class C0002 {

    /* renamed from: ۣ۟ۧۢ, reason: not valid java name and contains not printable characters */
    public static int f2 = -76;

    /* renamed from: ۟ۧۢۧ, reason: not valid java name and contains not printable characters */
    public static String m7(String str) {
        String str2 = "";
        int i = 0;
        String str3 = "";
        while (i < 15) {
            str2 = new StringBuffer().append(str2).append(Integer.toHexString(i)).toString();
            String stringBuffer = new StringBuffer().append(str3).append(((int) (Math.random() * 10)) ^ i).toString();
            i++;
            str3 = stringBuffer;
        }
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(str.length() / 2);
        for (int i2 = 0; i2 < str.length(); i2 += 2) {
            byteArrayOutputStream.write((str2.indexOf(str.charAt(i2)) << 4) | str2.indexOf(str.charAt(i2 + 1)));
        }
        byte[] byteArray = byteArrayOutputStream.toByteArray();
        int length = byteArray.length;
        int length2 = str3.length();
        for (int i3 = 0; i3 < length; i3++) {
            byteArray[i3] = (byte) (byteArray[i3] ^ str3.charAt(i3 % length2));
        }
        for (int i4 = 0; i4 < byteArray.length; i4 = "".length() + 1) {
        }
        return new String(byteArray);
    }

    /* renamed from: ۢۦۡ۟, reason: not valid java name and contains not printable characters */
    public static int m8() {
        return 1751648 ^ C0006.m20((Object) "ۣۤۡ");
    }

    /* renamed from: ۣ۟ۢۨۨ, reason: not valid java name and contains not printable characters */
    public static String m6(short[] sArr, int i, int i2, int i3) {
        char[] cArr = new char[i2];
        for (int i4 = 0; i4 < i2; i4++) {
            cArr[i4] = (char) (sArr[i + i4] ^ i3);
        }
        return new String(cArr);
    }
}
